{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport useHoverValue from \"./hooks/useHoverValue\";\nimport usePickerInput from \"./hooks/usePickerInput\";\nimport usePresets from \"./hooks/usePresets\";\nimport useRangeDisabled from \"./hooks/useRangeDisabled\";\nimport useRangeViewDates from \"./hooks/useRangeViewDates\";\nimport useTextValueMapping from \"./hooks/useTextValueMapping\";\nimport useValueTexts from \"./hooks/useValueTexts\";\nimport PanelContext from \"./PanelContext\";\nimport PickerPanel from \"./PickerPanel\";\nimport PickerTrigger from \"./PickerTrigger\";\nimport PresetPanel from \"./PresetPanel\";\nimport RangeContext from \"./RangeContext\";\nimport { formatValue, getClosingViewDate, isEqual, isSameDate, isSameQuarter, isSameWeek, parseValue } from \"./utils/dateUtil\";\nimport getExtraFooter from \"./utils/getExtraFooter\";\nimport getRanges from \"./utils/getRanges\";\nimport getDataOrAriaProps, { getValue, toArray, updateValues } from \"./utils/miscUtil\";\nimport { elementsContains, getDefaultFormat, getInputSize } from \"./utils/uiUtil\";\nimport { legacyPropsWarning } from \"./utils/warnUtil\";\nfunction reorderValues(values, generateConfig) {\n  if (values && values[0] && values[1] && generateConfig.isAfter(values[0], values[1])) {\n    return [values[1], values[0]];\n  }\n  return values;\n}\nfunction canValueTrigger(value, index, disabled, allowEmpty) {\n  if (value) {\n    return true;\n  }\n  if (allowEmpty && allowEmpty[index]) {\n    return true;\n  }\n  if (disabled[(index + 1) % 2]) {\n    return true;\n  }\n  return false;\n}\nfunction InnerRangePicker(props) {\n  var _classNames2, _classNames3, _classNames4;\n  var _ref = props,\n    _ref$prefixCls = _ref.prefixCls,\n    prefixCls = _ref$prefixCls === void 0 ? 'rc-picker' : _ref$prefixCls,\n    id = _ref.id,\n    style = _ref.style,\n    className = _ref.className,\n    popupStyle = _ref.popupStyle,\n    dropdownClassName = _ref.dropdownClassName,\n    transitionName = _ref.transitionName,\n    dropdownAlign = _ref.dropdownAlign,\n    getPopupContainer = _ref.getPopupContainer,\n    generateConfig = _ref.generateConfig,\n    locale = _ref.locale,\n    placeholder = _ref.placeholder,\n    autoFocus = _ref.autoFocus,\n    disabled = _ref.disabled,\n    format = _ref.format,\n    _ref$picker = _ref.picker,\n    picker = _ref$picker === void 0 ? 'date' : _ref$picker,\n    showTime = _ref.showTime,\n    use12Hours = _ref.use12Hours,\n    _ref$separator = _ref.separator,\n    separator = _ref$separator === void 0 ? '~' : _ref$separator,\n    value = _ref.value,\n    defaultValue = _ref.defaultValue,\n    defaultPickerValue = _ref.defaultPickerValue,\n    open = _ref.open,\n    defaultOpen = _ref.defaultOpen,\n    disabledDate = _ref.disabledDate,\n    _disabledTime = _ref.disabledTime,\n    dateRender = _ref.dateRender,\n    panelRender = _ref.panelRender,\n    presets = _ref.presets,\n    ranges = _ref.ranges,\n    allowEmpty = _ref.allowEmpty,\n    allowClear = _ref.allowClear,\n    suffixIcon = _ref.suffixIcon,\n    clearIcon = _ref.clearIcon,\n    pickerRef = _ref.pickerRef,\n    inputReadOnly = _ref.inputReadOnly,\n    mode = _ref.mode,\n    renderExtraFooter = _ref.renderExtraFooter,\n    onChange = _ref.onChange,\n    onOpenChange = _ref.onOpenChange,\n    onPanelChange = _ref.onPanelChange,\n    onCalendarChange = _ref.onCalendarChange,\n    _onFocus = _ref.onFocus,\n    onBlur = _ref.onBlur,\n    onMouseDown = _ref.onMouseDown,\n    onMouseUp = _ref.onMouseUp,\n    onMouseEnter = _ref.onMouseEnter,\n    onMouseLeave = _ref.onMouseLeave,\n    onClick = _ref.onClick,\n    _onOk = _ref.onOk,\n    _onKeyDown = _ref.onKeyDown,\n    components = _ref.components,\n    order = _ref.order,\n    direction = _ref.direction,\n    activePickerIndex = _ref.activePickerIndex,\n    _ref$autoComplete = _ref.autoComplete,\n    autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete;\n  var needConfirmButton = picker === 'date' && !!showTime || picker === 'time'; // We record opened status here in case repeat open with picker\n\n  var openRecordsRef = useRef({});\n  var containerRef = useRef(null);\n  var panelDivRef = useRef(null);\n  var startInputDivRef = useRef(null);\n  var endInputDivRef = useRef(null);\n  var separatorRef = useRef(null);\n  var startInputRef = useRef(null);\n  var endInputRef = useRef(null);\n  var arrowRef = useRef(null); // ============================ Warning ============================\n\n  if (process.env.NODE_ENV !== 'production') {\n    legacyPropsWarning(props);\n  } // ============================= Misc ==============================\n\n  var formatList = toArray(getDefaultFormat(format, picker, showTime, use12Hours)); // Active picker\n\n  var _useMergedState = useMergedState(0, {\n      value: activePickerIndex\n    }),\n    _useMergedState2 = _slicedToArray(_useMergedState, 2),\n    mergedActivePickerIndex = _useMergedState2[0],\n    setMergedActivePickerIndex = _useMergedState2[1]; // Operation ref\n\n  var operationRef = useRef(null);\n  var mergedDisabled = React.useMemo(function () {\n    if (Array.isArray(disabled)) {\n      return disabled;\n    }\n    return [disabled || false, disabled || false];\n  }, [disabled]); // ============================= Value =============================\n\n  var _useMergedState3 = useMergedState(null, {\n      value: value,\n      defaultValue: defaultValue,\n      postState: function postState(values) {\n        return picker === 'time' && !order ? values : reorderValues(values, generateConfig);\n      }\n    }),\n    _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n    mergedValue = _useMergedState4[0],\n    setInnerValue = _useMergedState4[1]; // =========================== View Date ===========================\n  // Config view panel\n\n  var _useRangeViewDates = useRangeViewDates({\n      values: mergedValue,\n      picker: picker,\n      defaultDates: defaultPickerValue,\n      generateConfig: generateConfig\n    }),\n    _useRangeViewDates2 = _slicedToArray(_useRangeViewDates, 2),\n    getViewDate = _useRangeViewDates2[0],\n    setViewDate = _useRangeViewDates2[1]; // ========================= Select Values =========================\n\n  var _useMergedState5 = useMergedState(mergedValue, {\n      postState: function postState(values) {\n        var postValues = values;\n        if (mergedDisabled[0] && mergedDisabled[1]) {\n          return postValues;\n        } // Fill disabled unit\n\n        for (var i = 0; i < 2; i += 1) {\n          if (mergedDisabled[i] && !getValue(postValues, i) && !getValue(allowEmpty, i)) {\n            postValues = updateValues(postValues, generateConfig.getNow(), i);\n          }\n        }\n        return postValues;\n      }\n    }),\n    _useMergedState6 = _slicedToArray(_useMergedState5, 2),\n    selectedValue = _useMergedState6[0],\n    setSelectedValue = _useMergedState6[1]; // ============================= Modes =============================\n\n  var _useMergedState7 = useMergedState([picker, picker], {\n      value: mode\n    }),\n    _useMergedState8 = _slicedToArray(_useMergedState7, 2),\n    mergedModes = _useMergedState8[0],\n    setInnerModes = _useMergedState8[1];\n  useEffect(function () {\n    setInnerModes([picker, picker]);\n  }, [picker]);\n  var triggerModesChange = function triggerModesChange(modes, values) {\n    setInnerModes(modes);\n    if (onPanelChange) {\n      onPanelChange(values, modes);\n    }\n  }; // ========================= Disable Date ==========================\n\n  var _useRangeDisabled = useRangeDisabled({\n      picker: picker,\n      selectedValue: selectedValue,\n      locale: locale,\n      disabled: mergedDisabled,\n      disabledDate: disabledDate,\n      generateConfig: generateConfig\n    }, openRecordsRef.current[1], openRecordsRef.current[0]),\n    _useRangeDisabled2 = _slicedToArray(_useRangeDisabled, 2),\n    disabledStartDate = _useRangeDisabled2[0],\n    disabledEndDate = _useRangeDisabled2[1]; // ============================= Open ==============================\n\n  var _useMergedState9 = useMergedState(false, {\n      value: open,\n      defaultValue: defaultOpen,\n      postState: function postState(postOpen) {\n        return mergedDisabled[mergedActivePickerIndex] ? false : postOpen;\n      },\n      onChange: function onChange(newOpen) {\n        if (onOpenChange) {\n          onOpenChange(newOpen);\n        }\n        if (!newOpen && operationRef.current && operationRef.current.onClose) {\n          operationRef.current.onClose();\n        }\n      }\n    }),\n    _useMergedState10 = _slicedToArray(_useMergedState9, 2),\n    mergedOpen = _useMergedState10[0],\n    triggerInnerOpen = _useMergedState10[1];\n  var startOpen = mergedOpen && mergedActivePickerIndex === 0;\n  var endOpen = mergedOpen && mergedActivePickerIndex === 1; // ============================= Popup =============================\n  // Popup min width\n\n  var _useState = useState(0),\n    _useState2 = _slicedToArray(_useState, 2),\n    popupMinWidth = _useState2[0],\n    setPopupMinWidth = _useState2[1];\n  useEffect(function () {\n    if (!mergedOpen && containerRef.current) {\n      setPopupMinWidth(containerRef.current.offsetWidth);\n    }\n  }, [mergedOpen]); // ============================ Trigger ============================\n\n  var triggerRef = React.useRef();\n  function _triggerOpen(newOpen, index) {\n    if (newOpen) {\n      clearTimeout(triggerRef.current);\n      openRecordsRef.current[index] = true;\n      setMergedActivePickerIndex(index);\n      triggerInnerOpen(newOpen); // Open to reset view date\n\n      if (!mergedOpen) {\n        setViewDate(null, index);\n      }\n    } else if (mergedActivePickerIndex === index) {\n      triggerInnerOpen(newOpen); // Clean up async\n      // This makes ref not quick refresh in case user open another input with blur trigger\n\n      var openRecords = openRecordsRef.current;\n      triggerRef.current = setTimeout(function () {\n        if (openRecords === openRecordsRef.current) {\n          openRecordsRef.current = {};\n        }\n      });\n    }\n  }\n  function triggerOpenAndFocus(index) {\n    _triggerOpen(true, index); // Use setTimeout to make sure panel DOM exists\n\n    setTimeout(function () {\n      var inputRef = [startInputRef, endInputRef][index];\n      if (inputRef.current) {\n        inputRef.current.focus();\n      }\n    }, 0);\n  }\n  function triggerChange(newValue, sourceIndex) {\n    var values = newValue;\n    var startValue = getValue(values, 0);\n    var endValue = getValue(values, 1); // >>>>> Format start & end values\n\n    if (startValue && endValue && generateConfig.isAfter(startValue, endValue)) {\n      if (\n      // WeekPicker only compare week\n      picker === 'week' && !isSameWeek(generateConfig, locale.locale, startValue, endValue) ||\n      // QuotaPicker only compare week\n      picker === 'quarter' && !isSameQuarter(generateConfig, startValue, endValue) ||\n      // Other non-TimePicker compare date\n      picker !== 'week' && picker !== 'quarter' && picker !== 'time' && !isSameDate(generateConfig, startValue, endValue)) {\n        // Clean up end date when start date is after end date\n        if (sourceIndex === 0) {\n          values = [startValue, null];\n          endValue = null;\n        } else {\n          startValue = null;\n          values = [null, endValue];\n        } // Clean up cache since invalidate\n\n        openRecordsRef.current = _defineProperty({}, sourceIndex, true);\n      } else if (picker !== 'time' || order !== false) {\n        // Reorder when in same date\n        values = reorderValues(values, generateConfig);\n      }\n    }\n    setSelectedValue(values);\n    var startStr = values && values[0] ? formatValue(values[0], {\n      generateConfig: generateConfig,\n      locale: locale,\n      format: formatList[0]\n    }) : '';\n    var endStr = values && values[1] ? formatValue(values[1], {\n      generateConfig: generateConfig,\n      locale: locale,\n      format: formatList[0]\n    }) : '';\n    if (onCalendarChange) {\n      var _info = {\n        range: sourceIndex === 0 ? 'start' : 'end'\n      };\n      onCalendarChange(values, [startStr, endStr], _info);\n    } // >>>>> Trigger `onChange` event\n\n    var canStartValueTrigger = canValueTrigger(startValue, 0, mergedDisabled, allowEmpty);\n    var canEndValueTrigger = canValueTrigger(endValue, 1, mergedDisabled, allowEmpty);\n    var canTrigger = values === null || canStartValueTrigger && canEndValueTrigger;\n    if (canTrigger) {\n      // Trigger onChange only when value is validate\n      setInnerValue(values);\n      if (onChange && (!isEqual(generateConfig, getValue(mergedValue, 0), startValue) || !isEqual(generateConfig, getValue(mergedValue, 1), endValue))) {\n        onChange(values, [startStr, endStr]);\n      }\n    } // >>>>> Open picker when\n    // Always open another picker if possible\n\n    var nextOpenIndex = null;\n    if (sourceIndex === 0 && !mergedDisabled[1]) {\n      nextOpenIndex = 1;\n    } else if (sourceIndex === 1 && !mergedDisabled[0]) {\n      nextOpenIndex = 0;\n    }\n    if (nextOpenIndex !== null && nextOpenIndex !== mergedActivePickerIndex && (!openRecordsRef.current[nextOpenIndex] || !getValue(values, nextOpenIndex)) && getValue(values, sourceIndex)) {\n      // Delay to focus to avoid input blur trigger expired selectedValues\n      triggerOpenAndFocus(nextOpenIndex);\n    } else {\n      _triggerOpen(false, sourceIndex);\n    }\n  }\n  var forwardKeyDown = function forwardKeyDown(e) {\n    if (mergedOpen && operationRef.current && operationRef.current.onKeyDown) {\n      // Let popup panel handle keyboard\n      return operationRef.current.onKeyDown(e);\n    }\n    /* istanbul ignore next */\n\n    /* eslint-disable no-lone-blocks */\n\n    {\n      warning(false, 'Picker not correct forward KeyDown operation. Please help to fire issue about this.');\n      return false;\n    }\n  }; // ============================= Text ==============================\n\n  var sharedTextHooksProps = {\n    formatList: formatList,\n    generateConfig: generateConfig,\n    locale: locale\n  };\n  var _useValueTexts = useValueTexts(getValue(selectedValue, 0), sharedTextHooksProps),\n    _useValueTexts2 = _slicedToArray(_useValueTexts, 2),\n    startValueTexts = _useValueTexts2[0],\n    firstStartValueText = _useValueTexts2[1];\n  var _useValueTexts3 = useValueTexts(getValue(selectedValue, 1), sharedTextHooksProps),\n    _useValueTexts4 = _slicedToArray(_useValueTexts3, 2),\n    endValueTexts = _useValueTexts4[0],\n    firstEndValueText = _useValueTexts4[1];\n  var _onTextChange = function onTextChange(newText, index) {\n    var inputDate = parseValue(newText, {\n      locale: locale,\n      formatList: formatList,\n      generateConfig: generateConfig\n    });\n    var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;\n    if (inputDate && !disabledFunc(inputDate)) {\n      setSelectedValue(updateValues(selectedValue, inputDate, index));\n      setViewDate(inputDate, index);\n    }\n  };\n  var _useTextValueMapping = useTextValueMapping({\n      valueTexts: startValueTexts,\n      onTextChange: function onTextChange(newText) {\n        return _onTextChange(newText, 0);\n      }\n    }),\n    _useTextValueMapping2 = _slicedToArray(_useTextValueMapping, 3),\n    startText = _useTextValueMapping2[0],\n    triggerStartTextChange = _useTextValueMapping2[1],\n    resetStartText = _useTextValueMapping2[2];\n  var _useTextValueMapping3 = useTextValueMapping({\n      valueTexts: endValueTexts,\n      onTextChange: function onTextChange(newText) {\n        return _onTextChange(newText, 1);\n      }\n    }),\n    _useTextValueMapping4 = _slicedToArray(_useTextValueMapping3, 3),\n    endText = _useTextValueMapping4[0],\n    triggerEndTextChange = _useTextValueMapping4[1],\n    resetEndText = _useTextValueMapping4[2];\n  var _useState3 = useState(null),\n    _useState4 = _slicedToArray(_useState3, 2),\n    rangeHoverValue = _useState4[0],\n    setRangeHoverValue = _useState4[1]; // ========================== Hover Range ==========================\n\n  var _useState5 = useState(null),\n    _useState6 = _slicedToArray(_useState5, 2),\n    hoverRangedValue = _useState6[0],\n    setHoverRangedValue = _useState6[1];\n  var _useHoverValue = useHoverValue(startText, {\n      formatList: formatList,\n      generateConfig: generateConfig,\n      locale: locale\n    }),\n    _useHoverValue2 = _slicedToArray(_useHoverValue, 3),\n    startHoverValue = _useHoverValue2[0],\n    onStartEnter = _useHoverValue2[1],\n    onStartLeave = _useHoverValue2[2];\n  var _useHoverValue3 = useHoverValue(endText, {\n      formatList: formatList,\n      generateConfig: generateConfig,\n      locale: locale\n    }),\n    _useHoverValue4 = _slicedToArray(_useHoverValue3, 3),\n    endHoverValue = _useHoverValue4[0],\n    onEndEnter = _useHoverValue4[1],\n    onEndLeave = _useHoverValue4[2];\n  var onDateMouseEnter = function onDateMouseEnter(date) {\n    setHoverRangedValue(updateValues(selectedValue, date, mergedActivePickerIndex));\n    if (mergedActivePickerIndex === 0) {\n      onStartEnter(date);\n    } else {\n      onEndEnter(date);\n    }\n  };\n  var onDateMouseLeave = function onDateMouseLeave() {\n    setHoverRangedValue(updateValues(selectedValue, null, mergedActivePickerIndex));\n    if (mergedActivePickerIndex === 0) {\n      onStartLeave();\n    } else {\n      onEndLeave();\n    }\n  }; // ============================= Input =============================\n\n  var getSharedInputHookProps = function getSharedInputHookProps(index, resetText) {\n    return {\n      blurToCancel: needConfirmButton,\n      forwardKeyDown: forwardKeyDown,\n      onBlur: onBlur,\n      isClickOutside: function isClickOutside(target) {\n        return !elementsContains([panelDivRef.current, startInputDivRef.current, endInputDivRef.current, containerRef.current], target);\n      },\n      onFocus: function onFocus(e) {\n        setMergedActivePickerIndex(index);\n        if (_onFocus) {\n          _onFocus(e);\n        }\n      },\n      triggerOpen: function triggerOpen(newOpen) {\n        _triggerOpen(newOpen, index);\n      },\n      onSubmit: function onSubmit() {\n        if (\n        // When user typing disabledDate with keyboard and enter, this value will be empty\n        !selectedValue ||\n        // Normal disabled check\n        disabledDate && disabledDate(selectedValue[index])) {\n          return false;\n        }\n        triggerChange(selectedValue, index);\n        resetText();\n      },\n      onCancel: function onCancel() {\n        _triggerOpen(false, index);\n        setSelectedValue(mergedValue);\n        resetText();\n      }\n    };\n  };\n  var _usePickerInput = usePickerInput(_objectSpread(_objectSpread({}, getSharedInputHookProps(0, resetStartText)), {}, {\n      open: startOpen,\n      value: startText,\n      onKeyDown: function onKeyDown(e, preventDefault) {\n        _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e, preventDefault);\n      }\n    })),\n    _usePickerInput2 = _slicedToArray(_usePickerInput, 2),\n    startInputProps = _usePickerInput2[0],\n    _usePickerInput2$ = _usePickerInput2[1],\n    startFocused = _usePickerInput2$.focused,\n    startTyping = _usePickerInput2$.typing;\n  var _usePickerInput3 = usePickerInput(_objectSpread(_objectSpread({}, getSharedInputHookProps(1, resetEndText)), {}, {\n      open: endOpen,\n      value: endText,\n      onKeyDown: function onKeyDown(e, preventDefault) {\n        _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e, preventDefault);\n      }\n    })),\n    _usePickerInput4 = _slicedToArray(_usePickerInput3, 2),\n    endInputProps = _usePickerInput4[0],\n    _usePickerInput4$ = _usePickerInput4[1],\n    endFocused = _usePickerInput4$.focused,\n    endTyping = _usePickerInput4$.typing; // ========================== Click Picker ==========================\n\n  var onPickerClick = function onPickerClick(e) {\n    // When click inside the picker & outside the picker's input elements\n    // the panel should still be opened\n    if (onClick) {\n      onClick(e);\n    }\n    if (!mergedOpen && !startInputRef.current.contains(e.target) && !endInputRef.current.contains(e.target)) {\n      if (!mergedDisabled[0]) {\n        triggerOpenAndFocus(0);\n      } else if (!mergedDisabled[1]) {\n        triggerOpenAndFocus(1);\n      }\n    }\n  };\n  var onPickerMouseDown = function onPickerMouseDown(e) {\n    // shouldn't affect input elements if picker is active\n    if (onMouseDown) {\n      onMouseDown(e);\n    }\n    if (mergedOpen && (startFocused || endFocused) && !startInputRef.current.contains(e.target) && !endInputRef.current.contains(e.target)) {\n      e.preventDefault();\n    }\n  }; // ============================= Sync ==============================\n  // Close should sync back with text value\n\n  var startStr = mergedValue && mergedValue[0] ? formatValue(mergedValue[0], {\n    locale: locale,\n    format: 'YYYYMMDDHHmmss',\n    generateConfig: generateConfig\n  }) : '';\n  var endStr = mergedValue && mergedValue[1] ? formatValue(mergedValue[1], {\n    locale: locale,\n    format: 'YYYYMMDDHHmmss',\n    generateConfig: generateConfig\n  }) : '';\n  useEffect(function () {\n    if (!mergedOpen) {\n      setSelectedValue(mergedValue);\n      if (!startValueTexts.length || startValueTexts[0] === '') {\n        triggerStartTextChange('');\n      } else if (firstStartValueText !== startText) {\n        resetStartText();\n      }\n      if (!endValueTexts.length || endValueTexts[0] === '') {\n        triggerEndTextChange('');\n      } else if (firstEndValueText !== endText) {\n        resetEndText();\n      }\n    }\n  }, [mergedOpen, startValueTexts, endValueTexts]); // Sync innerValue with control mode\n\n  useEffect(function () {\n    setSelectedValue(mergedValue);\n  }, [startStr, endStr]); // ============================ Warning ============================\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (value && Array.isArray(disabled) && (getValue(disabled, 0) && !getValue(value, 0) || getValue(disabled, 1) && !getValue(value, 1))) {\n      warning(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');\n    }\n  } // ============================ Private ============================\n\n  if (pickerRef) {\n    pickerRef.current = {\n      focus: function focus() {\n        if (startInputRef.current) {\n          startInputRef.current.focus();\n        }\n      },\n      blur: function blur() {\n        if (startInputRef.current) {\n          startInputRef.current.blur();\n        }\n        if (endInputRef.current) {\n          endInputRef.current.blur();\n        }\n      }\n    };\n  } // ============================ Ranges =============================\n\n  var presetList = usePresets(presets, ranges); // ============================= Panel =============================\n\n  function renderPanel() {\n    var panelPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    var panelProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var panelHoverRangedValue = null;\n    if (mergedOpen && hoverRangedValue && hoverRangedValue[0] && hoverRangedValue[1] && generateConfig.isAfter(hoverRangedValue[1], hoverRangedValue[0])) {\n      panelHoverRangedValue = hoverRangedValue;\n    }\n    var panelShowTime = showTime;\n    if (showTime && _typeof(showTime) === 'object' && showTime.defaultValue) {\n      var timeDefaultValues = showTime.defaultValue;\n      panelShowTime = _objectSpread(_objectSpread({}, showTime), {}, {\n        defaultValue: getValue(timeDefaultValues, mergedActivePickerIndex) || undefined\n      });\n    }\n    var panelDateRender = null;\n    if (dateRender) {\n      panelDateRender = function panelDateRender(date, today) {\n        return dateRender(date, today, {\n          range: mergedActivePickerIndex ? 'end' : 'start'\n        });\n      };\n    }\n    return /*#__PURE__*/React.createElement(RangeContext.Provider, {\n      value: {\n        inRange: true,\n        panelPosition: panelPosition,\n        rangedValue: rangeHoverValue || selectedValue,\n        hoverRangedValue: panelHoverRangedValue\n      }\n    }, /*#__PURE__*/React.createElement(PickerPanel, _extends({}, props, panelProps, {\n      dateRender: panelDateRender,\n      showTime: panelShowTime,\n      mode: mergedModes[mergedActivePickerIndex],\n      generateConfig: generateConfig,\n      style: undefined,\n      direction: direction,\n      disabledDate: mergedActivePickerIndex === 0 ? disabledStartDate : disabledEndDate,\n      disabledTime: function disabledTime(date) {\n        if (_disabledTime) {\n          return _disabledTime(date, mergedActivePickerIndex === 0 ? 'start' : 'end');\n        }\n        return false;\n      },\n      className: classNames(_defineProperty({}, \"\".concat(prefixCls, \"-panel-focused\"), mergedActivePickerIndex === 0 ? !startTyping : !endTyping)),\n      value: getValue(selectedValue, mergedActivePickerIndex),\n      locale: locale,\n      tabIndex: -1,\n      onPanelChange: function onPanelChange(date, newMode) {\n        // clear hover value when panel change\n        if (mergedActivePickerIndex === 0) {\n          onStartLeave(true);\n        }\n        if (mergedActivePickerIndex === 1) {\n          onEndLeave(true);\n        }\n        triggerModesChange(updateValues(mergedModes, newMode, mergedActivePickerIndex), updateValues(selectedValue, date, mergedActivePickerIndex));\n        var viewDate = date;\n        if (panelPosition === 'right' && mergedModes[mergedActivePickerIndex] === newMode) {\n          viewDate = getClosingViewDate(viewDate, newMode, generateConfig, -1);\n        }\n        setViewDate(viewDate, mergedActivePickerIndex);\n      },\n      onOk: null,\n      onSelect: undefined,\n      onChange: undefined,\n      defaultValue: mergedActivePickerIndex === 0 ? getValue(selectedValue, 1) : getValue(selectedValue, 0) // defaultPickerValue={undefined}\n    })));\n  }\n\n  var arrowLeft = 0;\n  var panelLeft = 0;\n  if (mergedActivePickerIndex && startInputDivRef.current && separatorRef.current && panelDivRef.current) {\n    // Arrow offset\n    arrowLeft = startInputDivRef.current.offsetWidth + separatorRef.current.offsetWidth; // If panelWidth - arrowWidth - arrowMarginLeft < arrowLeft, panel should move to right side.\n    // If arrowOffsetLeft > arrowLeft, arrowMarginLeft = arrowOffsetLeft - arrowLeft\n\n    var arrowMarginLeft = arrowRef.current.offsetLeft > arrowLeft ? arrowRef.current.offsetLeft - arrowLeft : arrowRef.current.offsetLeft;\n    if (panelDivRef.current.offsetWidth !== undefined && arrowRef.current.offsetWidth !== undefined && arrowLeft > panelDivRef.current.offsetWidth - arrowRef.current.offsetWidth - (direction === 'rtl' ? 0 : arrowMarginLeft)) {\n      panelLeft = arrowLeft;\n    }\n  }\n  var arrowPositionStyle = direction === 'rtl' ? {\n    right: arrowLeft\n  } : {\n    left: arrowLeft\n  };\n  function renderPanels() {\n    var panels;\n    var extraNode = getExtraFooter(prefixCls, mergedModes[mergedActivePickerIndex], renderExtraFooter);\n    var rangesNode = getRanges({\n      prefixCls: prefixCls,\n      components: components,\n      needConfirmButton: needConfirmButton,\n      okDisabled: !getValue(selectedValue, mergedActivePickerIndex) || disabledDate && disabledDate(selectedValue[mergedActivePickerIndex]),\n      locale: locale,\n      // rangeList,\n      onOk: function onOk() {\n        if (getValue(selectedValue, mergedActivePickerIndex)) {\n          // triggerChangeOld(selectedValue);\n          triggerChange(selectedValue, mergedActivePickerIndex);\n          if (_onOk) {\n            _onOk(selectedValue);\n          }\n        }\n      }\n    });\n    if (picker !== 'time' && !showTime) {\n      var viewDate = getViewDate(mergedActivePickerIndex);\n      var nextViewDate = getClosingViewDate(viewDate, picker, generateConfig);\n      var currentMode = mergedModes[mergedActivePickerIndex];\n      var showDoublePanel = currentMode === picker;\n      var leftPanel = renderPanel(showDoublePanel ? 'left' : false, {\n        pickerValue: viewDate,\n        onPickerValueChange: function onPickerValueChange(newViewDate) {\n          setViewDate(newViewDate, mergedActivePickerIndex);\n        }\n      });\n      var rightPanel = renderPanel('right', {\n        pickerValue: nextViewDate,\n        onPickerValueChange: function onPickerValueChange(newViewDate) {\n          setViewDate(getClosingViewDate(newViewDate, picker, generateConfig, -1), mergedActivePickerIndex);\n        }\n      });\n      if (direction === 'rtl') {\n        panels = /*#__PURE__*/React.createElement(React.Fragment, null, rightPanel, showDoublePanel && leftPanel);\n      } else {\n        panels = /*#__PURE__*/React.createElement(React.Fragment, null, leftPanel, showDoublePanel && rightPanel);\n      }\n    } else {\n      panels = renderPanel();\n    }\n    var mergedNodes = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panel-layout\")\n    }, /*#__PURE__*/React.createElement(PresetPanel, {\n      prefixCls: prefixCls,\n      presets: presetList,\n      onClick: function onClick(nextValue) {\n        triggerChange(nextValue, null);\n        _triggerOpen(false, mergedActivePickerIndex);\n      },\n      onHover: function onHover(hoverValue) {\n        setRangeHoverValue(hoverValue);\n      }\n    }), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panels\")\n    }, panels), (extraNode || rangesNode) && /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-footer\")\n    }, extraNode, rangesNode)));\n    if (panelRender) {\n      mergedNodes = panelRender(mergedNodes);\n    }\n    return /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panel-container\"),\n      style: {\n        marginLeft: panelLeft\n      },\n      ref: panelDivRef,\n      onMouseDown: function onMouseDown(e) {\n        e.preventDefault();\n      }\n    }, mergedNodes);\n  }\n  var rangePanel = /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-range-wrapper\"), \"\".concat(prefixCls, \"-\").concat(picker, \"-range-wrapper\")),\n    style: {\n      minWidth: popupMinWidth\n    }\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    ref: arrowRef,\n    className: \"\".concat(prefixCls, \"-range-arrow\"),\n    style: arrowPositionStyle\n  }), renderPanels()); // ============================= Icons =============================\n\n  var suffixNode;\n  if (suffixIcon) {\n    suffixNode = /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-suffix\")\n    }, suffixIcon);\n  }\n  var clearNode;\n  if (allowClear && (getValue(mergedValue, 0) && !mergedDisabled[0] || getValue(mergedValue, 1) && !mergedDisabled[1])) {\n    clearNode = /*#__PURE__*/React.createElement(\"span\", {\n      onMouseDown: function onMouseDown(e) {\n        e.preventDefault();\n        e.stopPropagation();\n      },\n      onMouseUp: function onMouseUp(e) {\n        e.preventDefault();\n        e.stopPropagation();\n        var values = mergedValue;\n        if (!mergedDisabled[0]) {\n          values = updateValues(values, null, 0);\n        }\n        if (!mergedDisabled[1]) {\n          values = updateValues(values, null, 1);\n        }\n        triggerChange(values, null);\n        _triggerOpen(false, mergedActivePickerIndex);\n      },\n      className: \"\".concat(prefixCls, \"-clear\")\n    }, clearIcon || /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-clear-btn\")\n    }));\n  }\n  var inputSharedProps = {\n    size: getInputSize(picker, formatList[0], generateConfig)\n  };\n  var activeBarLeft = 0;\n  var activeBarWidth = 0;\n  if (startInputDivRef.current && endInputDivRef.current && separatorRef.current) {\n    if (mergedActivePickerIndex === 0) {\n      activeBarWidth = startInputDivRef.current.offsetWidth;\n    } else {\n      activeBarLeft = arrowLeft;\n      activeBarWidth = endInputDivRef.current.offsetWidth;\n    }\n  }\n  var activeBarPositionStyle = direction === 'rtl' ? {\n    right: activeBarLeft\n  } : {\n    left: activeBarLeft\n  }; // ============================ Return =============================\n\n  var onContextSelect = function onContextSelect(date, type) {\n    var values = updateValues(selectedValue, date, mergedActivePickerIndex);\n    if (type === 'submit' || type !== 'key' && !needConfirmButton) {\n      // triggerChange will also update selected values\n      triggerChange(values, mergedActivePickerIndex); // clear hover value style\n\n      if (mergedActivePickerIndex === 0) {\n        onStartLeave();\n      } else {\n        onEndLeave();\n      }\n    } else {\n      setSelectedValue(values);\n    }\n  };\n  return /*#__PURE__*/React.createElement(PanelContext.Provider, {\n    value: {\n      operationRef: operationRef,\n      hideHeader: picker === 'time',\n      onDateMouseEnter: onDateMouseEnter,\n      onDateMouseLeave: onDateMouseLeave,\n      hideRanges: true,\n      onSelect: onContextSelect,\n      open: mergedOpen\n    }\n  }, /*#__PURE__*/React.createElement(PickerTrigger, {\n    visible: mergedOpen,\n    popupElement: rangePanel,\n    popupStyle: popupStyle,\n    prefixCls: prefixCls,\n    dropdownClassName: dropdownClassName,\n    dropdownAlign: dropdownAlign,\n    getPopupContainer: getPopupContainer,\n    transitionName: transitionName,\n    range: true,\n    direction: direction\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({\n    ref: containerRef,\n    className: classNames(prefixCls, \"\".concat(prefixCls, \"-range\"), className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), mergedDisabled[0] && mergedDisabled[1]), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mergedActivePickerIndex === 0 ? startFocused : endFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2)),\n    style: style,\n    onClick: onPickerClick,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave,\n    onMouseDown: onPickerMouseDown,\n    onMouseUp: onMouseUp\n  }, getDataOrAriaProps(props)), /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-input\"), (_classNames3 = {}, _defineProperty(_classNames3, \"\".concat(prefixCls, \"-input-active\"), mergedActivePickerIndex === 0), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-input-placeholder\"), !!startHoverValue), _classNames3)),\n    ref: startInputDivRef\n  }, /*#__PURE__*/React.createElement(\"input\", _extends({\n    id: id,\n    disabled: mergedDisabled[0],\n    readOnly: inputReadOnly || typeof formatList[0] === 'function' || !startTyping,\n    value: startHoverValue || startText,\n    onChange: function onChange(e) {\n      triggerStartTextChange(e.target.value);\n    },\n    autoFocus: autoFocus,\n    placeholder: getValue(placeholder, 0) || '',\n    ref: startInputRef\n  }, startInputProps, inputSharedProps, {\n    autoComplete: autoComplete\n  }))), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-range-separator\"),\n    ref: separatorRef\n  }, separator), /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-input\"), (_classNames4 = {}, _defineProperty(_classNames4, \"\".concat(prefixCls, \"-input-active\"), mergedActivePickerIndex === 1), _defineProperty(_classNames4, \"\".concat(prefixCls, \"-input-placeholder\"), !!endHoverValue), _classNames4)),\n    ref: endInputDivRef\n  }, /*#__PURE__*/React.createElement(\"input\", _extends({\n    disabled: mergedDisabled[1],\n    readOnly: inputReadOnly || typeof formatList[0] === 'function' || !endTyping,\n    value: endHoverValue || endText,\n    onChange: function onChange(e) {\n      triggerEndTextChange(e.target.value);\n    },\n    placeholder: getValue(placeholder, 1) || '',\n    ref: endInputRef\n  }, endInputProps, inputSharedProps, {\n    autoComplete: autoComplete\n  }))), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-active-bar\"),\n    style: _objectSpread(_objectSpread({}, activeBarPositionStyle), {}, {\n      width: activeBarWidth,\n      position: 'absolute'\n    })\n  }), suffixNode, clearNode)));\n} // Wrap with class component to enable pass generic with instance method\n\nvar RangePicker = /*#__PURE__*/function (_React$Component) {\n  _inherits(RangePicker, _React$Component);\n  var _super = _createSuper(RangePicker);\n  function RangePicker() {\n    var _this;\n    _classCallCheck(this, RangePicker);\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    _this = _super.call.apply(_super, [this].concat(args));\n    _defineProperty(_assertThisInitialized(_this), \"pickerRef\", /*#__PURE__*/React.createRef());\n    _defineProperty(_assertThisInitialized(_this), \"focus\", function () {\n      if (_this.pickerRef.current) {\n        _this.pickerRef.current.focus();\n      }\n    });\n    _defineProperty(_assertThisInitialized(_this), \"blur\", function () {\n      if (_this.pickerRef.current) {\n        _this.pickerRef.current.blur();\n      }\n    });\n    return _this;\n  }\n  _createClass(RangePicker, [{\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(InnerRangePicker, _extends({}, this.props, {\n        pickerRef: this.pickerRef\n      }));\n    }\n  }]);\n  return RangePicker;\n}(React.Component);\nexport default RangePicker;","map":{"version":3,"names":["_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","_extends","_typeof","_objectSpread","_defineProperty","_slicedToArray","classNames","useMergedState","warning","React","useEffect","useRef","useState","useHoverValue","usePickerInput","usePresets","useRangeDisabled","useRangeViewDates","useTextValueMapping","useValueTexts","PanelContext","PickerPanel","PickerTrigger","PresetPanel","RangeContext","formatValue","getClosingViewDate","isEqual","isSameDate","isSameQuarter","isSameWeek","parseValue","getExtraFooter","getRanges","getDataOrAriaProps","getValue","toArray","updateValues","elementsContains","getDefaultFormat","getInputSize","legacyPropsWarning","reorderValues","values","generateConfig","isAfter","canValueTrigger","value","index","disabled","allowEmpty","InnerRangePicker","props","_classNames2","_classNames3","_classNames4","_ref","_ref$prefixCls","prefixCls","id","style","className","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","locale","placeholder","autoFocus","format","_ref$picker","picker","showTime","use12Hours","_ref$separator","separator","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","_disabledTime","disabledTime","dateRender","panelRender","presets","ranges","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","_onFocus","onFocus","onBlur","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onClick","_onOk","onOk","_onKeyDown","onKeyDown","components","order","direction","activePickerIndex","_ref$autoComplete","autoComplete","needConfirmButton","openRecordsRef","containerRef","panelDivRef","startInputDivRef","endInputDivRef","separatorRef","startInputRef","endInputRef","arrowRef","process","env","NODE_ENV","formatList","_useMergedState","_useMergedState2","mergedActivePickerIndex","setMergedActivePickerIndex","operationRef","mergedDisabled","useMemo","Array","isArray","_useMergedState3","postState","_useMergedState4","mergedValue","setInnerValue","_useRangeViewDates","defaultDates","_useRangeViewDates2","getViewDate","setViewDate","_useMergedState5","postValues","i","getNow","_useMergedState6","selectedValue","setSelectedValue","_useMergedState7","_useMergedState8","mergedModes","setInnerModes","triggerModesChange","modes","_useRangeDisabled","current","_useRangeDisabled2","disabledStartDate","disabledEndDate","_useMergedState9","postOpen","newOpen","onClose","_useMergedState10","mergedOpen","triggerInnerOpen","startOpen","endOpen","_useState","_useState2","popupMinWidth","setPopupMinWidth","offsetWidth","triggerRef","_triggerOpen","clearTimeout","openRecords","setTimeout","triggerOpenAndFocus","inputRef","focus","triggerChange","newValue","sourceIndex","startValue","endValue","startStr","endStr","_info","range","canStartValueTrigger","canEndValueTrigger","canTrigger","nextOpenIndex","forwardKeyDown","e","sharedTextHooksProps","_useValueTexts","_useValueTexts2","startValueTexts","firstStartValueText","_useValueTexts3","_useValueTexts4","endValueTexts","firstEndValueText","_onTextChange","onTextChange","newText","inputDate","disabledFunc","_useTextValueMapping","valueTexts","_useTextValueMapping2","startText","triggerStartTextChange","resetStartText","_useTextValueMapping3","_useTextValueMapping4","endText","triggerEndTextChange","resetEndText","_useState3","_useState4","rangeHoverValue","setRangeHoverValue","_useState5","_useState6","hoverRangedValue","setHoverRangedValue","_useHoverValue","_useHoverValue2","startHoverValue","onStartEnter","onStartLeave","_useHoverValue3","_useHoverValue4","endHoverValue","onEndEnter","onEndLeave","onDateMouseEnter","date","onDateMouseLeave","getSharedInputHookProps","resetText","blurToCancel","isClickOutside","target","triggerOpen","onSubmit","onCancel","_usePickerInput","preventDefault","_usePickerInput2","startInputProps","_usePickerInput2$","startFocused","focused","startTyping","typing","_usePickerInput3","_usePickerInput4","endInputProps","_usePickerInput4$","endFocused","endTyping","onPickerClick","contains","onPickerMouseDown","length","blur","presetList","renderPanel","panelPosition","arguments","undefined","panelProps","panelHoverRangedValue","panelShowTime","timeDefaultValues","panelDateRender","today","createElement","Provider","inRange","rangedValue","concat","tabIndex","newMode","viewDate","onSelect","arrowLeft","panelLeft","arrowMarginLeft","offsetLeft","arrowPositionStyle","right","left","renderPanels","panels","extraNode","rangesNode","okDisabled","nextViewDate","currentMode","showDoublePanel","leftPanel","pickerValue","onPickerValueChange","newViewDate","rightPanel","Fragment","mergedNodes","nextValue","onHover","hoverValue","marginLeft","ref","rangePanel","minWidth","suffixNode","clearNode","stopPropagation","inputSharedProps","size","activeBarLeft","activeBarWidth","activeBarPositionStyle","onContextSelect","type","hideHeader","hideRanges","visible","popupElement","readOnly","width","position","RangePicker","_React$Component","_super","_this","_len","args","_key","call","apply","createRef","key","render","Component"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-picker/es/RangePicker.js"],"sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport useHoverValue from \"./hooks/useHoverValue\";\nimport usePickerInput from \"./hooks/usePickerInput\";\nimport usePresets from \"./hooks/usePresets\";\nimport useRangeDisabled from \"./hooks/useRangeDisabled\";\nimport useRangeViewDates from \"./hooks/useRangeViewDates\";\nimport useTextValueMapping from \"./hooks/useTextValueMapping\";\nimport useValueTexts from \"./hooks/useValueTexts\";\nimport PanelContext from \"./PanelContext\";\nimport PickerPanel from \"./PickerPanel\";\nimport PickerTrigger from \"./PickerTrigger\";\nimport PresetPanel from \"./PresetPanel\";\nimport RangeContext from \"./RangeContext\";\nimport { formatValue, getClosingViewDate, isEqual, isSameDate, isSameQuarter, isSameWeek, parseValue } from \"./utils/dateUtil\";\nimport getExtraFooter from \"./utils/getExtraFooter\";\nimport getRanges from \"./utils/getRanges\";\nimport getDataOrAriaProps, { getValue, toArray, updateValues } from \"./utils/miscUtil\";\nimport { elementsContains, getDefaultFormat, getInputSize } from \"./utils/uiUtil\";\nimport { legacyPropsWarning } from \"./utils/warnUtil\";\n\nfunction reorderValues(values, generateConfig) {\n  if (values && values[0] && values[1] && generateConfig.isAfter(values[0], values[1])) {\n    return [values[1], values[0]];\n  }\n\n  return values;\n}\n\nfunction canValueTrigger(value, index, disabled, allowEmpty) {\n  if (value) {\n    return true;\n  }\n\n  if (allowEmpty && allowEmpty[index]) {\n    return true;\n  }\n\n  if (disabled[(index + 1) % 2]) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction InnerRangePicker(props) {\n  var _classNames2, _classNames3, _classNames4;\n\n  var _ref = props,\n      _ref$prefixCls = _ref.prefixCls,\n      prefixCls = _ref$prefixCls === void 0 ? 'rc-picker' : _ref$prefixCls,\n      id = _ref.id,\n      style = _ref.style,\n      className = _ref.className,\n      popupStyle = _ref.popupStyle,\n      dropdownClassName = _ref.dropdownClassName,\n      transitionName = _ref.transitionName,\n      dropdownAlign = _ref.dropdownAlign,\n      getPopupContainer = _ref.getPopupContainer,\n      generateConfig = _ref.generateConfig,\n      locale = _ref.locale,\n      placeholder = _ref.placeholder,\n      autoFocus = _ref.autoFocus,\n      disabled = _ref.disabled,\n      format = _ref.format,\n      _ref$picker = _ref.picker,\n      picker = _ref$picker === void 0 ? 'date' : _ref$picker,\n      showTime = _ref.showTime,\n      use12Hours = _ref.use12Hours,\n      _ref$separator = _ref.separator,\n      separator = _ref$separator === void 0 ? '~' : _ref$separator,\n      value = _ref.value,\n      defaultValue = _ref.defaultValue,\n      defaultPickerValue = _ref.defaultPickerValue,\n      open = _ref.open,\n      defaultOpen = _ref.defaultOpen,\n      disabledDate = _ref.disabledDate,\n      _disabledTime = _ref.disabledTime,\n      dateRender = _ref.dateRender,\n      panelRender = _ref.panelRender,\n      presets = _ref.presets,\n      ranges = _ref.ranges,\n      allowEmpty = _ref.allowEmpty,\n      allowClear = _ref.allowClear,\n      suffixIcon = _ref.suffixIcon,\n      clearIcon = _ref.clearIcon,\n      pickerRef = _ref.pickerRef,\n      inputReadOnly = _ref.inputReadOnly,\n      mode = _ref.mode,\n      renderExtraFooter = _ref.renderExtraFooter,\n      onChange = _ref.onChange,\n      onOpenChange = _ref.onOpenChange,\n      onPanelChange = _ref.onPanelChange,\n      onCalendarChange = _ref.onCalendarChange,\n      _onFocus = _ref.onFocus,\n      onBlur = _ref.onBlur,\n      onMouseDown = _ref.onMouseDown,\n      onMouseUp = _ref.onMouseUp,\n      onMouseEnter = _ref.onMouseEnter,\n      onMouseLeave = _ref.onMouseLeave,\n      onClick = _ref.onClick,\n      _onOk = _ref.onOk,\n      _onKeyDown = _ref.onKeyDown,\n      components = _ref.components,\n      order = _ref.order,\n      direction = _ref.direction,\n      activePickerIndex = _ref.activePickerIndex,\n      _ref$autoComplete = _ref.autoComplete,\n      autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete;\n  var needConfirmButton = picker === 'date' && !!showTime || picker === 'time'; // We record opened status here in case repeat open with picker\n\n  var openRecordsRef = useRef({});\n  var containerRef = useRef(null);\n  var panelDivRef = useRef(null);\n  var startInputDivRef = useRef(null);\n  var endInputDivRef = useRef(null);\n  var separatorRef = useRef(null);\n  var startInputRef = useRef(null);\n  var endInputRef = useRef(null);\n  var arrowRef = useRef(null); // ============================ Warning ============================\n\n  if (process.env.NODE_ENV !== 'production') {\n    legacyPropsWarning(props);\n  } // ============================= Misc ==============================\n\n\n  var formatList = toArray(getDefaultFormat(format, picker, showTime, use12Hours)); // Active picker\n\n  var _useMergedState = useMergedState(0, {\n    value: activePickerIndex\n  }),\n      _useMergedState2 = _slicedToArray(_useMergedState, 2),\n      mergedActivePickerIndex = _useMergedState2[0],\n      setMergedActivePickerIndex = _useMergedState2[1]; // Operation ref\n\n\n  var operationRef = useRef(null);\n  var mergedDisabled = React.useMemo(function () {\n    if (Array.isArray(disabled)) {\n      return disabled;\n    }\n\n    return [disabled || false, disabled || false];\n  }, [disabled]); // ============================= Value =============================\n\n  var _useMergedState3 = useMergedState(null, {\n    value: value,\n    defaultValue: defaultValue,\n    postState: function postState(values) {\n      return picker === 'time' && !order ? values : reorderValues(values, generateConfig);\n    }\n  }),\n      _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n      mergedValue = _useMergedState4[0],\n      setInnerValue = _useMergedState4[1]; // =========================== View Date ===========================\n  // Config view panel\n\n\n  var _useRangeViewDates = useRangeViewDates({\n    values: mergedValue,\n    picker: picker,\n    defaultDates: defaultPickerValue,\n    generateConfig: generateConfig\n  }),\n      _useRangeViewDates2 = _slicedToArray(_useRangeViewDates, 2),\n      getViewDate = _useRangeViewDates2[0],\n      setViewDate = _useRangeViewDates2[1]; // ========================= Select Values =========================\n\n\n  var _useMergedState5 = useMergedState(mergedValue, {\n    postState: function postState(values) {\n      var postValues = values;\n\n      if (mergedDisabled[0] && mergedDisabled[1]) {\n        return postValues;\n      } // Fill disabled unit\n\n\n      for (var i = 0; i < 2; i += 1) {\n        if (mergedDisabled[i] && !getValue(postValues, i) && !getValue(allowEmpty, i)) {\n          postValues = updateValues(postValues, generateConfig.getNow(), i);\n        }\n      }\n\n      return postValues;\n    }\n  }),\n      _useMergedState6 = _slicedToArray(_useMergedState5, 2),\n      selectedValue = _useMergedState6[0],\n      setSelectedValue = _useMergedState6[1]; // ============================= Modes =============================\n\n\n  var _useMergedState7 = useMergedState([picker, picker], {\n    value: mode\n  }),\n      _useMergedState8 = _slicedToArray(_useMergedState7, 2),\n      mergedModes = _useMergedState8[0],\n      setInnerModes = _useMergedState8[1];\n\n  useEffect(function () {\n    setInnerModes([picker, picker]);\n  }, [picker]);\n\n  var triggerModesChange = function triggerModesChange(modes, values) {\n    setInnerModes(modes);\n\n    if (onPanelChange) {\n      onPanelChange(values, modes);\n    }\n  }; // ========================= Disable Date ==========================\n\n\n  var _useRangeDisabled = useRangeDisabled({\n    picker: picker,\n    selectedValue: selectedValue,\n    locale: locale,\n    disabled: mergedDisabled,\n    disabledDate: disabledDate,\n    generateConfig: generateConfig\n  }, openRecordsRef.current[1], openRecordsRef.current[0]),\n      _useRangeDisabled2 = _slicedToArray(_useRangeDisabled, 2),\n      disabledStartDate = _useRangeDisabled2[0],\n      disabledEndDate = _useRangeDisabled2[1]; // ============================= Open ==============================\n\n\n  var _useMergedState9 = useMergedState(false, {\n    value: open,\n    defaultValue: defaultOpen,\n    postState: function postState(postOpen) {\n      return mergedDisabled[mergedActivePickerIndex] ? false : postOpen;\n    },\n    onChange: function onChange(newOpen) {\n      if (onOpenChange) {\n        onOpenChange(newOpen);\n      }\n\n      if (!newOpen && operationRef.current && operationRef.current.onClose) {\n        operationRef.current.onClose();\n      }\n    }\n  }),\n      _useMergedState10 = _slicedToArray(_useMergedState9, 2),\n      mergedOpen = _useMergedState10[0],\n      triggerInnerOpen = _useMergedState10[1];\n\n  var startOpen = mergedOpen && mergedActivePickerIndex === 0;\n  var endOpen = mergedOpen && mergedActivePickerIndex === 1; // ============================= Popup =============================\n  // Popup min width\n\n  var _useState = useState(0),\n      _useState2 = _slicedToArray(_useState, 2),\n      popupMinWidth = _useState2[0],\n      setPopupMinWidth = _useState2[1];\n\n  useEffect(function () {\n    if (!mergedOpen && containerRef.current) {\n      setPopupMinWidth(containerRef.current.offsetWidth);\n    }\n  }, [mergedOpen]); // ============================ Trigger ============================\n\n  var triggerRef = React.useRef();\n\n  function _triggerOpen(newOpen, index) {\n    if (newOpen) {\n      clearTimeout(triggerRef.current);\n      openRecordsRef.current[index] = true;\n      setMergedActivePickerIndex(index);\n      triggerInnerOpen(newOpen); // Open to reset view date\n\n      if (!mergedOpen) {\n        setViewDate(null, index);\n      }\n    } else if (mergedActivePickerIndex === index) {\n      triggerInnerOpen(newOpen); // Clean up async\n      // This makes ref not quick refresh in case user open another input with blur trigger\n\n      var openRecords = openRecordsRef.current;\n      triggerRef.current = setTimeout(function () {\n        if (openRecords === openRecordsRef.current) {\n          openRecordsRef.current = {};\n        }\n      });\n    }\n  }\n\n  function triggerOpenAndFocus(index) {\n    _triggerOpen(true, index); // Use setTimeout to make sure panel DOM exists\n\n\n    setTimeout(function () {\n      var inputRef = [startInputRef, endInputRef][index];\n\n      if (inputRef.current) {\n        inputRef.current.focus();\n      }\n    }, 0);\n  }\n\n  function triggerChange(newValue, sourceIndex) {\n    var values = newValue;\n    var startValue = getValue(values, 0);\n    var endValue = getValue(values, 1); // >>>>> Format start & end values\n\n    if (startValue && endValue && generateConfig.isAfter(startValue, endValue)) {\n      if ( // WeekPicker only compare week\n      picker === 'week' && !isSameWeek(generateConfig, locale.locale, startValue, endValue) || // QuotaPicker only compare week\n      picker === 'quarter' && !isSameQuarter(generateConfig, startValue, endValue) || // Other non-TimePicker compare date\n      picker !== 'week' && picker !== 'quarter' && picker !== 'time' && !isSameDate(generateConfig, startValue, endValue)) {\n        // Clean up end date when start date is after end date\n        if (sourceIndex === 0) {\n          values = [startValue, null];\n          endValue = null;\n        } else {\n          startValue = null;\n          values = [null, endValue];\n        } // Clean up cache since invalidate\n\n\n        openRecordsRef.current = _defineProperty({}, sourceIndex, true);\n      } else if (picker !== 'time' || order !== false) {\n        // Reorder when in same date\n        values = reorderValues(values, generateConfig);\n      }\n    }\n\n    setSelectedValue(values);\n    var startStr = values && values[0] ? formatValue(values[0], {\n      generateConfig: generateConfig,\n      locale: locale,\n      format: formatList[0]\n    }) : '';\n    var endStr = values && values[1] ? formatValue(values[1], {\n      generateConfig: generateConfig,\n      locale: locale,\n      format: formatList[0]\n    }) : '';\n\n    if (onCalendarChange) {\n      var _info = {\n        range: sourceIndex === 0 ? 'start' : 'end'\n      };\n      onCalendarChange(values, [startStr, endStr], _info);\n    } // >>>>> Trigger `onChange` event\n\n\n    var canStartValueTrigger = canValueTrigger(startValue, 0, mergedDisabled, allowEmpty);\n    var canEndValueTrigger = canValueTrigger(endValue, 1, mergedDisabled, allowEmpty);\n    var canTrigger = values === null || canStartValueTrigger && canEndValueTrigger;\n\n    if (canTrigger) {\n      // Trigger onChange only when value is validate\n      setInnerValue(values);\n\n      if (onChange && (!isEqual(generateConfig, getValue(mergedValue, 0), startValue) || !isEqual(generateConfig, getValue(mergedValue, 1), endValue))) {\n        onChange(values, [startStr, endStr]);\n      }\n    } // >>>>> Open picker when\n    // Always open another picker if possible\n\n\n    var nextOpenIndex = null;\n\n    if (sourceIndex === 0 && !mergedDisabled[1]) {\n      nextOpenIndex = 1;\n    } else if (sourceIndex === 1 && !mergedDisabled[0]) {\n      nextOpenIndex = 0;\n    }\n\n    if (nextOpenIndex !== null && nextOpenIndex !== mergedActivePickerIndex && (!openRecordsRef.current[nextOpenIndex] || !getValue(values, nextOpenIndex)) && getValue(values, sourceIndex)) {\n      // Delay to focus to avoid input blur trigger expired selectedValues\n      triggerOpenAndFocus(nextOpenIndex);\n    } else {\n      _triggerOpen(false, sourceIndex);\n    }\n  }\n\n  var forwardKeyDown = function forwardKeyDown(e) {\n    if (mergedOpen && operationRef.current && operationRef.current.onKeyDown) {\n      // Let popup panel handle keyboard\n      return operationRef.current.onKeyDown(e);\n    }\n    /* istanbul ignore next */\n\n    /* eslint-disable no-lone-blocks */\n\n\n    {\n      warning(false, 'Picker not correct forward KeyDown operation. Please help to fire issue about this.');\n      return false;\n    }\n  }; // ============================= Text ==============================\n\n\n  var sharedTextHooksProps = {\n    formatList: formatList,\n    generateConfig: generateConfig,\n    locale: locale\n  };\n\n  var _useValueTexts = useValueTexts(getValue(selectedValue, 0), sharedTextHooksProps),\n      _useValueTexts2 = _slicedToArray(_useValueTexts, 2),\n      startValueTexts = _useValueTexts2[0],\n      firstStartValueText = _useValueTexts2[1];\n\n  var _useValueTexts3 = useValueTexts(getValue(selectedValue, 1), sharedTextHooksProps),\n      _useValueTexts4 = _slicedToArray(_useValueTexts3, 2),\n      endValueTexts = _useValueTexts4[0],\n      firstEndValueText = _useValueTexts4[1];\n\n  var _onTextChange = function onTextChange(newText, index) {\n    var inputDate = parseValue(newText, {\n      locale: locale,\n      formatList: formatList,\n      generateConfig: generateConfig\n    });\n    var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;\n\n    if (inputDate && !disabledFunc(inputDate)) {\n      setSelectedValue(updateValues(selectedValue, inputDate, index));\n      setViewDate(inputDate, index);\n    }\n  };\n\n  var _useTextValueMapping = useTextValueMapping({\n    valueTexts: startValueTexts,\n    onTextChange: function onTextChange(newText) {\n      return _onTextChange(newText, 0);\n    }\n  }),\n      _useTextValueMapping2 = _slicedToArray(_useTextValueMapping, 3),\n      startText = _useTextValueMapping2[0],\n      triggerStartTextChange = _useTextValueMapping2[1],\n      resetStartText = _useTextValueMapping2[2];\n\n  var _useTextValueMapping3 = useTextValueMapping({\n    valueTexts: endValueTexts,\n    onTextChange: function onTextChange(newText) {\n      return _onTextChange(newText, 1);\n    }\n  }),\n      _useTextValueMapping4 = _slicedToArray(_useTextValueMapping3, 3),\n      endText = _useTextValueMapping4[0],\n      triggerEndTextChange = _useTextValueMapping4[1],\n      resetEndText = _useTextValueMapping4[2];\n\n  var _useState3 = useState(null),\n      _useState4 = _slicedToArray(_useState3, 2),\n      rangeHoverValue = _useState4[0],\n      setRangeHoverValue = _useState4[1]; // ========================== Hover Range ==========================\n\n\n  var _useState5 = useState(null),\n      _useState6 = _slicedToArray(_useState5, 2),\n      hoverRangedValue = _useState6[0],\n      setHoverRangedValue = _useState6[1];\n\n  var _useHoverValue = useHoverValue(startText, {\n    formatList: formatList,\n    generateConfig: generateConfig,\n    locale: locale\n  }),\n      _useHoverValue2 = _slicedToArray(_useHoverValue, 3),\n      startHoverValue = _useHoverValue2[0],\n      onStartEnter = _useHoverValue2[1],\n      onStartLeave = _useHoverValue2[2];\n\n  var _useHoverValue3 = useHoverValue(endText, {\n    formatList: formatList,\n    generateConfig: generateConfig,\n    locale: locale\n  }),\n      _useHoverValue4 = _slicedToArray(_useHoverValue3, 3),\n      endHoverValue = _useHoverValue4[0],\n      onEndEnter = _useHoverValue4[1],\n      onEndLeave = _useHoverValue4[2];\n\n  var onDateMouseEnter = function onDateMouseEnter(date) {\n    setHoverRangedValue(updateValues(selectedValue, date, mergedActivePickerIndex));\n\n    if (mergedActivePickerIndex === 0) {\n      onStartEnter(date);\n    } else {\n      onEndEnter(date);\n    }\n  };\n\n  var onDateMouseLeave = function onDateMouseLeave() {\n    setHoverRangedValue(updateValues(selectedValue, null, mergedActivePickerIndex));\n\n    if (mergedActivePickerIndex === 0) {\n      onStartLeave();\n    } else {\n      onEndLeave();\n    }\n  }; // ============================= Input =============================\n\n\n  var getSharedInputHookProps = function getSharedInputHookProps(index, resetText) {\n    return {\n      blurToCancel: needConfirmButton,\n      forwardKeyDown: forwardKeyDown,\n      onBlur: onBlur,\n      isClickOutside: function isClickOutside(target) {\n        return !elementsContains([panelDivRef.current, startInputDivRef.current, endInputDivRef.current, containerRef.current], target);\n      },\n      onFocus: function onFocus(e) {\n        setMergedActivePickerIndex(index);\n\n        if (_onFocus) {\n          _onFocus(e);\n        }\n      },\n      triggerOpen: function triggerOpen(newOpen) {\n        _triggerOpen(newOpen, index);\n      },\n      onSubmit: function onSubmit() {\n        if ( // When user typing disabledDate with keyboard and enter, this value will be empty\n        !selectedValue || // Normal disabled check\n        disabledDate && disabledDate(selectedValue[index])) {\n          return false;\n        }\n\n        triggerChange(selectedValue, index);\n        resetText();\n      },\n      onCancel: function onCancel() {\n        _triggerOpen(false, index);\n\n        setSelectedValue(mergedValue);\n        resetText();\n      }\n    };\n  };\n\n  var _usePickerInput = usePickerInput(_objectSpread(_objectSpread({}, getSharedInputHookProps(0, resetStartText)), {}, {\n    open: startOpen,\n    value: startText,\n    onKeyDown: function onKeyDown(e, preventDefault) {\n      _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e, preventDefault);\n    }\n  })),\n      _usePickerInput2 = _slicedToArray(_usePickerInput, 2),\n      startInputProps = _usePickerInput2[0],\n      _usePickerInput2$ = _usePickerInput2[1],\n      startFocused = _usePickerInput2$.focused,\n      startTyping = _usePickerInput2$.typing;\n\n  var _usePickerInput3 = usePickerInput(_objectSpread(_objectSpread({}, getSharedInputHookProps(1, resetEndText)), {}, {\n    open: endOpen,\n    value: endText,\n    onKeyDown: function onKeyDown(e, preventDefault) {\n      _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e, preventDefault);\n    }\n  })),\n      _usePickerInput4 = _slicedToArray(_usePickerInput3, 2),\n      endInputProps = _usePickerInput4[0],\n      _usePickerInput4$ = _usePickerInput4[1],\n      endFocused = _usePickerInput4$.focused,\n      endTyping = _usePickerInput4$.typing; // ========================== Click Picker ==========================\n\n\n  var onPickerClick = function onPickerClick(e) {\n    // When click inside the picker & outside the picker's input elements\n    // the panel should still be opened\n    if (onClick) {\n      onClick(e);\n    }\n\n    if (!mergedOpen && !startInputRef.current.contains(e.target) && !endInputRef.current.contains(e.target)) {\n      if (!mergedDisabled[0]) {\n        triggerOpenAndFocus(0);\n      } else if (!mergedDisabled[1]) {\n        triggerOpenAndFocus(1);\n      }\n    }\n  };\n\n  var onPickerMouseDown = function onPickerMouseDown(e) {\n    // shouldn't affect input elements if picker is active\n    if (onMouseDown) {\n      onMouseDown(e);\n    }\n\n    if (mergedOpen && (startFocused || endFocused) && !startInputRef.current.contains(e.target) && !endInputRef.current.contains(e.target)) {\n      e.preventDefault();\n    }\n  }; // ============================= Sync ==============================\n  // Close should sync back with text value\n\n\n  var startStr = mergedValue && mergedValue[0] ? formatValue(mergedValue[0], {\n    locale: locale,\n    format: 'YYYYMMDDHHmmss',\n    generateConfig: generateConfig\n  }) : '';\n  var endStr = mergedValue && mergedValue[1] ? formatValue(mergedValue[1], {\n    locale: locale,\n    format: 'YYYYMMDDHHmmss',\n    generateConfig: generateConfig\n  }) : '';\n  useEffect(function () {\n    if (!mergedOpen) {\n      setSelectedValue(mergedValue);\n\n      if (!startValueTexts.length || startValueTexts[0] === '') {\n        triggerStartTextChange('');\n      } else if (firstStartValueText !== startText) {\n        resetStartText();\n      }\n\n      if (!endValueTexts.length || endValueTexts[0] === '') {\n        triggerEndTextChange('');\n      } else if (firstEndValueText !== endText) {\n        resetEndText();\n      }\n    }\n  }, [mergedOpen, startValueTexts, endValueTexts]); // Sync innerValue with control mode\n\n  useEffect(function () {\n    setSelectedValue(mergedValue);\n  }, [startStr, endStr]); // ============================ Warning ============================\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (value && Array.isArray(disabled) && (getValue(disabled, 0) && !getValue(value, 0) || getValue(disabled, 1) && !getValue(value, 1))) {\n      warning(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');\n    }\n  } // ============================ Private ============================\n\n\n  if (pickerRef) {\n    pickerRef.current = {\n      focus: function focus() {\n        if (startInputRef.current) {\n          startInputRef.current.focus();\n        }\n      },\n      blur: function blur() {\n        if (startInputRef.current) {\n          startInputRef.current.blur();\n        }\n\n        if (endInputRef.current) {\n          endInputRef.current.blur();\n        }\n      }\n    };\n  } // ============================ Ranges =============================\n\n\n  var presetList = usePresets(presets, ranges); // ============================= Panel =============================\n\n  function renderPanel() {\n    var panelPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    var panelProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var panelHoverRangedValue = null;\n\n    if (mergedOpen && hoverRangedValue && hoverRangedValue[0] && hoverRangedValue[1] && generateConfig.isAfter(hoverRangedValue[1], hoverRangedValue[0])) {\n      panelHoverRangedValue = hoverRangedValue;\n    }\n\n    var panelShowTime = showTime;\n\n    if (showTime && _typeof(showTime) === 'object' && showTime.defaultValue) {\n      var timeDefaultValues = showTime.defaultValue;\n      panelShowTime = _objectSpread(_objectSpread({}, showTime), {}, {\n        defaultValue: getValue(timeDefaultValues, mergedActivePickerIndex) || undefined\n      });\n    }\n\n    var panelDateRender = null;\n\n    if (dateRender) {\n      panelDateRender = function panelDateRender(date, today) {\n        return dateRender(date, today, {\n          range: mergedActivePickerIndex ? 'end' : 'start'\n        });\n      };\n    }\n\n    return /*#__PURE__*/React.createElement(RangeContext.Provider, {\n      value: {\n        inRange: true,\n        panelPosition: panelPosition,\n        rangedValue: rangeHoverValue || selectedValue,\n        hoverRangedValue: panelHoverRangedValue\n      }\n    }, /*#__PURE__*/React.createElement(PickerPanel, _extends({}, props, panelProps, {\n      dateRender: panelDateRender,\n      showTime: panelShowTime,\n      mode: mergedModes[mergedActivePickerIndex],\n      generateConfig: generateConfig,\n      style: undefined,\n      direction: direction,\n      disabledDate: mergedActivePickerIndex === 0 ? disabledStartDate : disabledEndDate,\n      disabledTime: function disabledTime(date) {\n        if (_disabledTime) {\n          return _disabledTime(date, mergedActivePickerIndex === 0 ? 'start' : 'end');\n        }\n\n        return false;\n      },\n      className: classNames(_defineProperty({}, \"\".concat(prefixCls, \"-panel-focused\"), mergedActivePickerIndex === 0 ? !startTyping : !endTyping)),\n      value: getValue(selectedValue, mergedActivePickerIndex),\n      locale: locale,\n      tabIndex: -1,\n      onPanelChange: function onPanelChange(date, newMode) {\n        // clear hover value when panel change\n        if (mergedActivePickerIndex === 0) {\n          onStartLeave(true);\n        }\n\n        if (mergedActivePickerIndex === 1) {\n          onEndLeave(true);\n        }\n\n        triggerModesChange(updateValues(mergedModes, newMode, mergedActivePickerIndex), updateValues(selectedValue, date, mergedActivePickerIndex));\n        var viewDate = date;\n\n        if (panelPosition === 'right' && mergedModes[mergedActivePickerIndex] === newMode) {\n          viewDate = getClosingViewDate(viewDate, newMode, generateConfig, -1);\n        }\n\n        setViewDate(viewDate, mergedActivePickerIndex);\n      },\n      onOk: null,\n      onSelect: undefined,\n      onChange: undefined,\n      defaultValue: mergedActivePickerIndex === 0 ? getValue(selectedValue, 1) : getValue(selectedValue, 0) // defaultPickerValue={undefined}\n\n    })));\n  }\n\n  var arrowLeft = 0;\n  var panelLeft = 0;\n\n  if (mergedActivePickerIndex && startInputDivRef.current && separatorRef.current && panelDivRef.current) {\n    // Arrow offset\n    arrowLeft = startInputDivRef.current.offsetWidth + separatorRef.current.offsetWidth; // If panelWidth - arrowWidth - arrowMarginLeft < arrowLeft, panel should move to right side.\n    // If arrowOffsetLeft > arrowLeft, arrowMarginLeft = arrowOffsetLeft - arrowLeft\n\n    var arrowMarginLeft = arrowRef.current.offsetLeft > arrowLeft ? arrowRef.current.offsetLeft - arrowLeft : arrowRef.current.offsetLeft;\n\n    if (panelDivRef.current.offsetWidth !== undefined && arrowRef.current.offsetWidth !== undefined && arrowLeft > panelDivRef.current.offsetWidth - arrowRef.current.offsetWidth - (direction === 'rtl' ? 0 : arrowMarginLeft)) {\n      panelLeft = arrowLeft;\n    }\n  }\n\n  var arrowPositionStyle = direction === 'rtl' ? {\n    right: arrowLeft\n  } : {\n    left: arrowLeft\n  };\n\n  function renderPanels() {\n    var panels;\n    var extraNode = getExtraFooter(prefixCls, mergedModes[mergedActivePickerIndex], renderExtraFooter);\n    var rangesNode = getRanges({\n      prefixCls: prefixCls,\n      components: components,\n      needConfirmButton: needConfirmButton,\n      okDisabled: !getValue(selectedValue, mergedActivePickerIndex) || disabledDate && disabledDate(selectedValue[mergedActivePickerIndex]),\n      locale: locale,\n      // rangeList,\n      onOk: function onOk() {\n        if (getValue(selectedValue, mergedActivePickerIndex)) {\n          // triggerChangeOld(selectedValue);\n          triggerChange(selectedValue, mergedActivePickerIndex);\n\n          if (_onOk) {\n            _onOk(selectedValue);\n          }\n        }\n      }\n    });\n\n    if (picker !== 'time' && !showTime) {\n      var viewDate = getViewDate(mergedActivePickerIndex);\n      var nextViewDate = getClosingViewDate(viewDate, picker, generateConfig);\n      var currentMode = mergedModes[mergedActivePickerIndex];\n      var showDoublePanel = currentMode === picker;\n      var leftPanel = renderPanel(showDoublePanel ? 'left' : false, {\n        pickerValue: viewDate,\n        onPickerValueChange: function onPickerValueChange(newViewDate) {\n          setViewDate(newViewDate, mergedActivePickerIndex);\n        }\n      });\n      var rightPanel = renderPanel('right', {\n        pickerValue: nextViewDate,\n        onPickerValueChange: function onPickerValueChange(newViewDate) {\n          setViewDate(getClosingViewDate(newViewDate, picker, generateConfig, -1), mergedActivePickerIndex);\n        }\n      });\n\n      if (direction === 'rtl') {\n        panels = /*#__PURE__*/React.createElement(React.Fragment, null, rightPanel, showDoublePanel && leftPanel);\n      } else {\n        panels = /*#__PURE__*/React.createElement(React.Fragment, null, leftPanel, showDoublePanel && rightPanel);\n      }\n    } else {\n      panels = renderPanel();\n    }\n\n    var mergedNodes = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panel-layout\")\n    }, /*#__PURE__*/React.createElement(PresetPanel, {\n      prefixCls: prefixCls,\n      presets: presetList,\n      onClick: function onClick(nextValue) {\n        triggerChange(nextValue, null);\n\n        _triggerOpen(false, mergedActivePickerIndex);\n      },\n      onHover: function onHover(hoverValue) {\n        setRangeHoverValue(hoverValue);\n      }\n    }), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panels\")\n    }, panels), (extraNode || rangesNode) && /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-footer\")\n    }, extraNode, rangesNode)));\n\n    if (panelRender) {\n      mergedNodes = panelRender(mergedNodes);\n    }\n\n    return /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-panel-container\"),\n      style: {\n        marginLeft: panelLeft\n      },\n      ref: panelDivRef,\n      onMouseDown: function onMouseDown(e) {\n        e.preventDefault();\n      }\n    }, mergedNodes);\n  }\n\n  var rangePanel = /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-range-wrapper\"), \"\".concat(prefixCls, \"-\").concat(picker, \"-range-wrapper\")),\n    style: {\n      minWidth: popupMinWidth\n    }\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    ref: arrowRef,\n    className: \"\".concat(prefixCls, \"-range-arrow\"),\n    style: arrowPositionStyle\n  }), renderPanels()); // ============================= Icons =============================\n\n  var suffixNode;\n\n  if (suffixIcon) {\n    suffixNode = /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-suffix\")\n    }, suffixIcon);\n  }\n\n  var clearNode;\n\n  if (allowClear && (getValue(mergedValue, 0) && !mergedDisabled[0] || getValue(mergedValue, 1) && !mergedDisabled[1])) {\n    clearNode = /*#__PURE__*/React.createElement(\"span\", {\n      onMouseDown: function onMouseDown(e) {\n        e.preventDefault();\n        e.stopPropagation();\n      },\n      onMouseUp: function onMouseUp(e) {\n        e.preventDefault();\n        e.stopPropagation();\n        var values = mergedValue;\n\n        if (!mergedDisabled[0]) {\n          values = updateValues(values, null, 0);\n        }\n\n        if (!mergedDisabled[1]) {\n          values = updateValues(values, null, 1);\n        }\n\n        triggerChange(values, null);\n\n        _triggerOpen(false, mergedActivePickerIndex);\n      },\n      className: \"\".concat(prefixCls, \"-clear\")\n    }, clearIcon || /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-clear-btn\")\n    }));\n  }\n\n  var inputSharedProps = {\n    size: getInputSize(picker, formatList[0], generateConfig)\n  };\n  var activeBarLeft = 0;\n  var activeBarWidth = 0;\n\n  if (startInputDivRef.current && endInputDivRef.current && separatorRef.current) {\n    if (mergedActivePickerIndex === 0) {\n      activeBarWidth = startInputDivRef.current.offsetWidth;\n    } else {\n      activeBarLeft = arrowLeft;\n      activeBarWidth = endInputDivRef.current.offsetWidth;\n    }\n  }\n\n  var activeBarPositionStyle = direction === 'rtl' ? {\n    right: activeBarLeft\n  } : {\n    left: activeBarLeft\n  }; // ============================ Return =============================\n\n  var onContextSelect = function onContextSelect(date, type) {\n    var values = updateValues(selectedValue, date, mergedActivePickerIndex);\n\n    if (type === 'submit' || type !== 'key' && !needConfirmButton) {\n      // triggerChange will also update selected values\n      triggerChange(values, mergedActivePickerIndex); // clear hover value style\n\n      if (mergedActivePickerIndex === 0) {\n        onStartLeave();\n      } else {\n        onEndLeave();\n      }\n    } else {\n      setSelectedValue(values);\n    }\n  };\n\n  return /*#__PURE__*/React.createElement(PanelContext.Provider, {\n    value: {\n      operationRef: operationRef,\n      hideHeader: picker === 'time',\n      onDateMouseEnter: onDateMouseEnter,\n      onDateMouseLeave: onDateMouseLeave,\n      hideRanges: true,\n      onSelect: onContextSelect,\n      open: mergedOpen\n    }\n  }, /*#__PURE__*/React.createElement(PickerTrigger, {\n    visible: mergedOpen,\n    popupElement: rangePanel,\n    popupStyle: popupStyle,\n    prefixCls: prefixCls,\n    dropdownClassName: dropdownClassName,\n    dropdownAlign: dropdownAlign,\n    getPopupContainer: getPopupContainer,\n    transitionName: transitionName,\n    range: true,\n    direction: direction\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({\n    ref: containerRef,\n    className: classNames(prefixCls, \"\".concat(prefixCls, \"-range\"), className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), mergedDisabled[0] && mergedDisabled[1]), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mergedActivePickerIndex === 0 ? startFocused : endFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2)),\n    style: style,\n    onClick: onPickerClick,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave,\n    onMouseDown: onPickerMouseDown,\n    onMouseUp: onMouseUp\n  }, getDataOrAriaProps(props)), /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-input\"), (_classNames3 = {}, _defineProperty(_classNames3, \"\".concat(prefixCls, \"-input-active\"), mergedActivePickerIndex === 0), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-input-placeholder\"), !!startHoverValue), _classNames3)),\n    ref: startInputDivRef\n  }, /*#__PURE__*/React.createElement(\"input\", _extends({\n    id: id,\n    disabled: mergedDisabled[0],\n    readOnly: inputReadOnly || typeof formatList[0] === 'function' || !startTyping,\n    value: startHoverValue || startText,\n    onChange: function onChange(e) {\n      triggerStartTextChange(e.target.value);\n    },\n    autoFocus: autoFocus,\n    placeholder: getValue(placeholder, 0) || '',\n    ref: startInputRef\n  }, startInputProps, inputSharedProps, {\n    autoComplete: autoComplete\n  }))), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-range-separator\"),\n    ref: separatorRef\n  }, separator), /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-input\"), (_classNames4 = {}, _defineProperty(_classNames4, \"\".concat(prefixCls, \"-input-active\"), mergedActivePickerIndex === 1), _defineProperty(_classNames4, \"\".concat(prefixCls, \"-input-placeholder\"), !!endHoverValue), _classNames4)),\n    ref: endInputDivRef\n  }, /*#__PURE__*/React.createElement(\"input\", _extends({\n    disabled: mergedDisabled[1],\n    readOnly: inputReadOnly || typeof formatList[0] === 'function' || !endTyping,\n    value: endHoverValue || endText,\n    onChange: function onChange(e) {\n      triggerEndTextChange(e.target.value);\n    },\n    placeholder: getValue(placeholder, 1) || '',\n    ref: endInputRef\n  }, endInputProps, inputSharedProps, {\n    autoComplete: autoComplete\n  }))), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-active-bar\"),\n    style: _objectSpread(_objectSpread({}, activeBarPositionStyle), {}, {\n      width: activeBarWidth,\n      position: 'absolute'\n    })\n  }), suffixNode, clearNode)));\n} // Wrap with class component to enable pass generic with instance method\n\n\nvar RangePicker = /*#__PURE__*/function (_React$Component) {\n  _inherits(RangePicker, _React$Component);\n\n  var _super = _createSuper(RangePicker);\n\n  function RangePicker() {\n    var _this;\n\n    _classCallCheck(this, RangePicker);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _super.call.apply(_super, [this].concat(args));\n\n    _defineProperty(_assertThisInitialized(_this), \"pickerRef\", /*#__PURE__*/React.createRef());\n\n    _defineProperty(_assertThisInitialized(_this), \"focus\", function () {\n      if (_this.pickerRef.current) {\n        _this.pickerRef.current.focus();\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_this), \"blur\", function () {\n      if (_this.pickerRef.current) {\n        _this.pickerRef.current.blur();\n      }\n    });\n\n    return _this;\n  }\n\n  _createClass(RangePicker, [{\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(InnerRangePicker, _extends({}, this.props, {\n        pickerRef: this.pickerRef\n      }));\n    }\n  }]);\n\n  return RangePicker;\n}(React.Component);\n\nexport default RangePicker;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,sBAAsB,MAAM,kDAAkD;AACrF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnD,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,WAAW,EAAEC,kBAAkB,EAAEC,OAAO,EAAEC,UAAU,EAAEC,aAAa,EAAEC,UAAU,EAAEC,UAAU,QAAQ,kBAAkB;AAC9H,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,SAAS,MAAM,mB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